package com.lyz.innerclass;

/**
 * @ClassName GameDemo
 * @Description 内部类
 * @Author 2214361854
 * @Date 2022/2/19 15:42
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Quter quter = new Quter();
        System.out.println(quter.staticNO);

        //静态内部类
        Quter.Inner i1 = new Quter.Inner();
        //成员内部类
        Quter.Inner2 i2 = new Quter().new Inner2();
        Quter.Inner2 i22 = quter.new Inner2();
        System.out.println("=====");
        //匿名内部类
        Animal animal = new Animal(){
            @Override
            public void run() {
                System.out.println("老虎跑的快~~~");
            }
        };
        animal.run();
    }
}


//class Tiger extends Animal{
//    @Override
//    public void run() {
//        System.out.println("老虎跑的快~~~");
//    }
//}
abstract class Animal{
        public abstract void run();
}